package com.ktwlsoft.archivemanage.domain.dao.repository;

import java.util.List;

import com.alibaba.fastjson.JSONObject;
import com.ktwlsoft.archivemanage.payload.role.EditRoleRequest;
import com.ktwlsoft.archivemanage.payload.role.QueryRoleRequest;
import org.apache.ibatis.annotations.Mapper;
import com.ktwlsoft.archivemanage.domain.dao.entity.Role;

/**
 * role--角色
 *
 * @author zhuhe on 2019-10-24 14:19:43
 * @version 1.0
 */
@Mapper
public interface IRoleMapper {
	
	/**
	 * 查询列表 on 2019-10-24 14:19:43
	 * @param role role
	 * @return List<Role>
	 */
	List<Role> findList(QueryRoleRequest role);
	
	
	/**
	 * 根据id查询信息 on 2019-10-24 14:19:43
	 * @param id id
	 * @return Role
	 */
	Role getById(Long id);
	
	
	/**
	 * 根据id删除信息 on 2019-10-24 14:19:43
	 * @param id id
	 * @return int
	 */
	int deleteById(Long id);
	
	/**
	 * 根据id集合批量删除信息 on 2019-10-24 14:19:43
	 * @param ids ids
	 * @return int
	 */
	int deleteByIds(List<Long> ids);
	


	/**
	 * 插入 on 2019-10-24 14:19:43
	 * @param role role
	 * @return int
	 */
    int insert(Role role);

	/**
	 * 更新 on 2019-10-24 14:19:43
	 * @param role role
	 * @return int
	 */
    int update(EditRoleRequest role);

    List<Role> getByUserName(String userName);

    int updateRoleRights(JSONObject jsonObject);
}
